import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Login {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("SpringSetting.xml");

        User user = (User) context.getBean("user");
        user.sayHi();

        User u1 = context.getBean(User.class);
        u1.sayHi();
    }
}
